<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--1. body中新增一个元素 <div id="app"></div>-->
    <div id="app"></div>
</body>
<!-- 导入react和react-dom两个js文件 -->
<!-- react.development.js 提供创建元素和组件能力的核心库-->
<script src="./node_modules/react/umd/react.development.js"></script>
<!-- react-dom.development.js 将元素和组件能力渲染界面上-->
<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
<script>
    // <!-- 2、是用React 核心库创建一个 React 元素 -->
    const title = React.createElement("h1",{id:"text"},"hello")
    // 3、使用 ReactDOM.render(element,container)
    ReactDOM.render(title,document.getElementById("app"))
</script>
</html>